﻿using System;

using Infrastructure.Diagnostics;
using TempEmployees.DAL;
using TempEmployees.BLL.Database;

namespace TempEmployees.Web
{
    public class SessionState
    {
        //name in session dictionary
        public static readonly string SESSION_STATE = "SessionState";

        //user ID - User.UserID
        private string m_userId;
        public string UserId { get { return m_userId; } }
        //user role
        private DbConstants.Roles m_userRole;
        public DbConstants.Roles UserRole { get { return m_userRole; } }
        //user first page
        private string m_userFirstPage;
        public string UserFirstPage { get { return m_userFirstPage; } }

        //C'tor
        public SessionState(string userId, DbConstants.Roles userRole, string user_firstPage)
        {
            m_userId = userId;
            m_userRole = userRole;
            m_userFirstPage = user_firstPage;
            Logger.Debug("Created session | ID: {0} | Role: {1}", userId, userRole.HebrewName());
        }
    }
}
